import net.egork.utils.Solver;
import net.egork.utils.io.InputReader;

import java.io.PrintWriter;
import java.text.BreakIterator;

public class TaskC implements Solver {
    public void solve(int testNumber, InputReader in, PrintWriter out) {

        int k = in.readInt();
        String str = in.readString();
        StringBuilder s = new StringBuilder();

        StringBuilder charSet = new StringBuilder();
        for (int i = 0; i < k; ++i)
            charSet.append((char) ('a' + i));

        int n = str.length();
        for (int i = 0, j = n - 1; i <= j; ++i, --j)
            if (str.charAt(i) == str.charAt(j))
                s.append(str.charAt(i));
            else if (str.charAt(i) == '?')
                s.append(str.charAt(j));
            else if (str.charAt(j) == '?')
                s.append(str.charAt(i));
            else {
                out.println("IMPOSSIBLE");
                return;
            }

        int nMasks = 0;
        for (int i = 0; i < s.length(); ++i)
            if (s.charAt(i) == '?')
                ++nMasks;

        for (int i = 0; i < s.length(); ++i) {
            int j = charSet.indexOf(s.charAt(i) + "");
            if (j >= 0)
                charSet.deleteCharAt(j);
        }

        for (int i = 0; i < s.length(); ++i)
            if (s.charAt(i) == '?') {
                if (nMasks <= charSet.length()) {
                    if (charSet.length() > 0) {
                        s.replace(i, i + 1, charSet.substring(0, 1));
                        charSet.deleteCharAt(0);
                    } else {
                        out.println("IMPOSSIBLE");
                        return;
                    }
                } else {
                    s.replace(i, i + 1, "a");
                }
                --nMasks;
            }

        if (charSet.length() > 0)
            out.println("IMPOSSIBLE");
        else if (n % 2 == 0)
            out.println(s.toString() + s.reverse());
        else
            out.println(s.toString() + s.reverse().substring(1));
    }
}
